package com.three.usermanagement.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.three.core.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author liuliyuan
* @description 针对表【tb_role(角色信息表)】的数据库操作Mapper
* @createDate 2025-03-11 18:41:17
* @Entity com.lly.entity.Role
*/
@Mapper
public interface RoleMapper extends BaseMapper<Role> {


    List<Role> selectRoleByUserId(Integer id);

    int batchInsert(@Param("userId") Integer userId, @Param("roleIds") Integer[] roleIds);

    int deleteRolesByUserId(Integer userId);
    int deleteRoleById(Integer roleId);
}
